package com.leyou.config;

import com.leyou.utils.CollectionNameBuilder;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class MongoDbConfig {
    @Value("${ly.mongo.collectionNamePrefix}")
    private String collectionNamePrefix;


    @Bean
    public CollectionNameBuilder collectionNameBuilder() {
        return new CollectionNameBuilder(collectionNamePrefix);
    }
}
